<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        class Person{
            constructor(name,sex,six){
                this.name=name
                this.sex=sex
                this.six=six
            }
            getInformation(){
                console.log(`姓名${this.name}性别${this.sex}年龄${this.six}`);
            }
        }
        class Student extends Person{
            
        }
        class Teacher extends Person{
            
        }
        let stu=new Student("小明","男","12");
        let tea=new Teacher("小蓝","女","19");
        stu.getInformation();
        tea.getInformation()
    </script>
</body>
</html>